<br/>
<form action="" id="activi_mes" method="post">
    <table>
        <tr>
            <td id="cal1"><input type="hidden" name="ac" value="ls"/></td>
        </tr>
        <tr>
            <td>
                <input type="hidden" name="desde" readonly="readonly"/>
                <input type="hidden" name="hasta" readonly="readonly"/>
            </td>
        </tr>
        <tr>
            <td><input type="submit" value="Ver" id="ver" class="send"/></td>
        </tr>
    </table>
</form>
<script type="text/javascript">//<![CDATA[
    var now = new Date();
    var cal1 = Calendar.setup({
        cont: "cal1", 
        date: now,
        onSelect : updateFields
    });
    var desde = '01/' + ("0" + (now.getMonth() + 1)).slice(-2) + '/' + now.getFullYear();
    $('input[name=desde]').val(desde);
    var hasta = '01/' + ("0" + (now.getMonth() + 2)).slice(-2) + '/' + now.getFullYear();
    $('input[name=hasta]').val(hasta);
    
    function updateFields(cal) {
        var date = cal.selection.get();
        if (date) {
            date = Calendar.intToDate(date);
            desde = '01/' + Calendar.printDate(date, "%m") + '/' + date.getFullYear();
            $('input[name=desde]').val(desde);
            hasta = '01/' + ("0" + (parseInt(Calendar.printDate(date, "%m")) + 1)).slice(-2) + '/' + date.getFullYear();
            $('input[name=hasta]').val(hasta);
            $("#activi_mes").submit();
        }
    };
    $("#activi_mes").submit(function() {
        $.post('acti', $("#activi_mes").serialize(), function(data) {
            $("#centro").html(data);
        });
        $("#centro").html('<p><img src="images/loading.gif" /><br/>Consultando...</p>');
        return false;
    } );
    //]]></script>